﻿using System.Collections.Generic;
using System.Linq;

namespace élénkPróbája
{
    /// <summary>
    /// Provides metadata about a validator.
    /// </summary>
    public interface ILitValidatorDescriptor
    {

        /// <summary>
        /// Gets the name display name for a property. 
        /// </summary>
        string GetName(string property);

        /// <summary>
        /// Gets a collection of validators grouped by property.
        /// </summary>
        ILookup<string, ILitPropertyValidator> GetMembersWithValidators();

        /// <summary>
        /// Gets validators for a particular property.
        /// </summary>
        IEnumerable<ILitPropertyValidator> GetValidatorsForMember(string name);

        /// <summary>
        /// Gets rules for a property.
        /// </summary>
        IEnumerable<IValidationRule> GetRulesForMember(string name);
    }
}